package cn.yj.email.handle;

import cn.yj.email.EmailType;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.beans.factory.annotation.Value;

import java.io.Serializable;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class Email implements Serializable
{

    /**
     * <br>
     * 发送人
     */
    @Value("${spring.mail.username}")
    private String from="1375668614@qq.com";

    @Value("${spring.mail.usernick}")
    private String userNick="永健";

    /**
     * <br>
     * 接收人
     *
     */
    private String recEmail;
    /**
     * <br>
     * 主题
     */
    private EmailType subject;

    /**
     * <br>
     * 内容
     */
    private Object content;

    public Email(EmailType subject, Object content)
    {
        this.subject = subject;
        this.content = content;
    }

    public Email(Object content)
    {
        this.content = content;
    }
}
